home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / ada / gnat1792.zip / gnat179b / examples / makefile < prev    next >
Makefile  |  1994-05-13  |  1KB  |  62 lines

  1. #-----------------------------------------------------------------------------
  2. #                               EXAMPLES  Makefile
  3. #-----------------------------------------------------------------------------
  4. #
  5. # Do not modify this file.  If you want to add a new example, modify the file
  6. # Makefile.dep.
  7. #-----------------------------------------------------------------------------
  8.  
  9. # the C compiler
  10. CC = gcc
  11.  
  12. # the Ada Compiler
  13. ADAC = $(CC)
  14.  
  15. # Gnat1 compilation flags
  16. GF =
  17.  
  18. # Gnatbind binder flags
  19. BF =
  20.  
  21. # Extension for ".o" files
  22. o = o
  23.  
  24. # Extension for executable files
  25. e =
  26.  
  27.  
  28. #-----------------------------------------------------------------------------
  29. # Main rule
  30.  
  31. main_rule : process
  32.  
  33. include Makefile.dep
  34.  
  35. process : clean $(LIST_EXEC)
  36.  
  37.  
  38. ###############################################################################
  39. # General rules
  40. ###############################################################################
  41. .SUFFIXES: .adb .ads .ali .o
  42. .PHONY: clean process force
  43.  
  44. .adb.o:
  45.     $(ADAC) -c $(GF)  $<
  46.  
  47. .ads.o:
  48.     $(ADAC) -c $(GF)  $<
  49.  
  50. .c.o:
  51.     $(CC) -c $(CFLAGS) $<
  52.  
  53. % : %.o
  54.     gnatbl $@.ali -o $@ $($@_DEP)
  55.     ./$@
  56.  
  57.  
  58. clean : force
  59.     @/bin/rm -f *.$o *.ali bind_*.c *.s $(LIST_EXEC)
  60.  
  61. force :
  62.